#include <bits/stdc++.h>
 
typedef long long ll;
const int mod = 998244353;
const int N = 2e5 + 5;
 
inline int addint(int x) { return x < mod ? x : x - mod; }
inline void Add(int &x, int y) { x += y; if (x >= mod) x -= mod; }
 
int n, K, f[N], dp[N][405], s[2][N], c[2], b[2][N][405], sb[N], cb;
std::vector<int> G[N];
 
void dfs(int u) {
	for (int v : G[u]) if (v != f[u]) { f[v] = u; dfs(v); }
}
 
inline void push(int fl, int u) {
	s[fl][++c[fl]] = u;
	memcpy(b[fl][c[fl]], b[fl][c[fl] - 1], sizeof(int) * (K + 1));
	for (int i = 0; i <= K; ++i) Add(b[fl][c[fl]][i], dp[u - 1][i]);
}
 
inline int fi(int fl, int u) {
	return std::lower_bound(s[fl] + 1, s[fl] + c[fl] + 1, u + 1) - s[fl] - 1;
}
 
int main() {
	freopen("soft.in", "r", stdin);
	freopen("soft.out", "w", stdout);
	scanf("%d%d", &n, &K);
	for (int i = 1; i < n; ++i) {
		int x, y; scanf("%d%d", &x, &y);
		G[x].push_back(y), G[y].push_back(x);
	}
	dfs(1);
	dp[0][0] = 1;
	for (int i = 1; i <= n; ++i) {
		if (f[i] > i) sb[++cb] = i;
		push(0, i);
		int lst1 = 0, lst2 = 0;
		while (cb && f[sb[cb]] <= i) --cb; if (cb) lst1 = sb[cb--];
		while (cb && f[sb[cb]] <= i) --cb; if (cb) lst2 = sb[cb];
		if (lst1) sb[++cb] = lst1;
		if (f[i] < i) {
			while (c[1] && s[1][c[1]] > f[i]) --c[1];
			int tmp = c[0];
			while (tmp && s[0][tmp] > f[i]) --tmp;
			for (int j = tmp + 1; j <= c[0]; ++j) push(1, s[0][j]);
			c[0] = tmp;
		}
		//printf("q0: "); for (int j = 1; j <= c[0]; ++j) printf("%d ", s[0][j]); puts("");
		//printf("q1: "); for (int j = 1; j <= c[1]; ++j) printf("%d ", s[1][j]); puts("");
		int t1 = fi(1, lst1), t2 = fi(0, lst1), t3 = fi(0, lst2);
		for (int j = 1; j <= K; ++j) {
			dp[i][j] = addint(addint(b[1][c[1]][j - 1] + mod - b[1][t1][j - 1])
				+ addint(b[0][t2][j - 1] + mod - b[0][t3][j - 1]));
		}
		//for (int j = 1; j <= K; ++j) printf("%d ", dp[i][j]); puts("");
	}
	for (int i = 1; i <= K; ++i) printf("%d\n", dp[n][i]);
	return 0;
}